package creationPattern.Builder.Builder_01.director;

import creationPattern.Builder.Builder_01.builder.Builder;
import creationPattern.Builder.Builder_01.product.Bike;

/**
 * 指挥者类
 */
public class Director {
    private Builder mBuilder;
    public Director(Builder mBuilder){
        this.mBuilder = mBuilder;
    }
    // 指挥者来调用【抽象建造者】的建造方法
    public Bike construct(){
        mBuilder.buildFrame();
        mBuilder.buildSeat();
        return mBuilder.createBike();
    }
}
